<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class ShopUserSocres extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
      Schema::create('shop_user_socres', function (Blueprint $table) {
        $table->increments('id');
        $table->Integer('user_id')->unsigned();
        $table->unsignedInteger('scores');
        $table->timestamps();

        $table->foreign('user_id')
        ->references('id')->on('shop_home_users')
            ->onDelete('cascade');
      });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
      Schema::dropIfExists('shop_user_socres');
    }
}
